<tagLib name="fanwe" />
<include file="Public:header" />
<form id="form" action="{:U(MODULE_NAME.'/doindex')}" method="post">
    <?php
    foreach($index_cids as $cid) {
    ?>
    <table cellpadding="4" cellspacing="0" border="0" class="table-form">
        <caption style="text-align:center;font-size:16px;font-weight:bold;"><?=$names[$cid]?></caption>
        <?php
        for($i = 0; $i < 8; $i++) {
            $str = '';
            if(!empty($arr[$cid][$i])) {
                $arr1 = array();
                foreach($arr[$cid][$i] as $v) {
                    $arr1[] = implode('#', $v);
                }
                $str = implode("\r\n", $arr1);
            }
        ?>
        <tr>
        	<th width="150">位置<?=$i+1?></th>
        	<td><textarea  name="data[<?=$cid?>][<?=$i?>]" style="margin: 0px; width: 852px; height: 174px;"><?=$str?></textarea></td>
        </tr>
        <?php }?>
        <tr>
            <th width="150"></th>
            <td><input type="submit" name="doadd" value="提交" class="submit_btn"/></th>
        </tr>
    </table>
    <?php }?>
</form>
<include file="Public:footer" />